// SPDX-FileCopyrightText: 2023-2025 Sangfor Technologies Inc.
// SPDX-License-Identifier: Mulan PSL v2
package interceptor

import (
	"net/http"

	"code.geniusai.org/notebook-manager/pkg/entity"
	"github.com/gin-gonic/gin"
)

type MockNotebookHandler struct {
}

func NewMockNotebookHandler() *MockNotebookHandler {
	return &MockNotebookHandler{}
}

func (n *MockNotebookHandler) Create(c *gin.Context) error {
	success(c, "{}")
	return nil
}

func (n *MockNotebookHandler) Start(c *gin.Context) error {
	success(c, "{}")
	return nil
}

func (n *MockNotebookHandler) ShowCpuUsage(c *gin.Context) error {
	success(c, "{}")
	return nil
}

func (n *MockNotebookHandler) Modify(c *gin.Context) error {
	success(c, "{}")
	return nil
}

// 返回成功的结果
func success(c *gin.Context, data interface{}) {
	c.JSON(http.StatusOK, entity.HttpRespond{
		Code:    entity.SuccessCode,
		Msg:     "ok",
		Success: true,
		Data:    data,
	})
}
